﻿using System;
using System.Collections.Generic;
using Family.Core.Model;
using NHibernate;
using NHibernate.Criterion;

namespace Family.Core.DataInterfaces
{
    public interface IRepository<T> where T : EntityWithTypeId<Int32>
    {
        void SaveOrUpdate(T entity);

        IList<T> GetAll();

        void Delete(T entity);

        T Get(Int32 id);

        ICriteria FindByCriteria(DetachedCriteria criteria);

        //EntityPage<T> GetPage(int pageNumber, int pageSize, string sortBy, bool ascending);
    }
}
